<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 插件菜单
*/
defined('BY_JYA') or exit('error');
$plugins=$this->plugins();
foreach($plugins as $ki=>&$item){
	$item['child']=$item['list'];
	unset($item['list']);
	foreach($item['child'] as $k=>&$p){
		if(!$p['is_install']){
			unset($item['child'][$k]);
		}else{
			if($p['actionurl']){
				$p['url']=$p['actionurl'];
			}else{
				$p['url']=$p['name'].'/basic.module_home/';
			}
		}
	}
}
// 是主应用时的菜单
$menus=array(
		array('title'=>'运营中心','fa'=>'icon-dianpu','url'=>'jy_scrm/index/','child'=>array(
			array('title'=>'平台概况','child'=>array(
				array('url'=>'jy_scrm/index/','title'=>'平台概况'),
				array('url'=>'jy_scrm/count/','title'=>'数据总览'),
				array('url'=>'jy_scrm/count_log/','title'=>'运营明细'),
			)),
			array('title'=>'入口管理','child'=>array(
				array('url'=>'jy_scrm/links/','title'=>'独立入口链接'),
				array('url'=>'jy_scrm/basic.module_home/cover/ac=index&type=3','title'=>'员工入口'),
			)),
		)),
		array('title'=>'SCRM设置','fa'=>'icon-shezhi','url'=>'jy_scrm/setting/','child'=>array(
			array('title'=>'基本设置','child'=>array(
				array('url'=>'jy_scrm/setting/','title'=>'基本设置'),
				array('url'=>'core/wxwork.list/','title'=>'企微列表'),
				array('url'=>'core/wxwork.app/','title'=>'自建应用列表'),
				array('url'=>'core/wxwork.authapp//pluginname=jy_scrm','title'=>'授权添加应用'),
			)),
			array('title'=>'其他设置','child'=>array(
				array('url'=>'jy_scrm/welcomelist/','title'=>'欢迎语'),
				array('url'=>'jy_scrm/menuset/','title'=>'聊天侧边栏'),
				array('url'=>'jy_scrm/help/','title'=>'企微新手必读'),
			)),
			array('title'=>'门店设置','child'=>array(
				array('url'=>'jy_scrm/store.group/','title'=>'门店组'),
				array('url'=>'jy_scrm/store.brand/','title'=>'门店品牌'),
			)),
		)),
		array('title'=>'门店管理','fa'=>'icon-dianpu','url'=>'jy_scrm/store.list/','child'=>array(
			array('title'=>'门店管理','child'=>array(
				array('url'=>'jy_scrm/store.list/','title'=>'门店管理'),
				array('url'=>'jy_scrm/store.worker/','title'=>'店员管理'),
			)),
		)),
		array('title'=>'任务管理','fa'=>'icon-bussinessman','url'=>'jy_scrmtask/qun/','child'=>array(
			array('title'=>'任务管理','child'=>array(
				array('url'=>'jy_scrmtask/qun/','title'=>'社群维护任务'),
				array('url'=>'jy_scrmtask/genjin/','title'=>'好友跟进任务'),
				array('url'=>'jy_scrmtask/quan/','title'=>'朋友圈任务'),
				array('url'=>'jy_scrmtask/siyu/','title'=>'私域运营任务'),
			)),
			array('title'=>'任务日志','child'=>array(
				array('url'=>'jy_scrmtask/log//type=0','title'=>'社群维护日志'),
				array('url'=>'jy_scrmtask/log//type=1','title'=>'好友跟进日志'),
				array('url'=>'jy_scrmtask/log//type=2','title'=>'朋友圈日志'),
				array('url'=>'jy_scrmtask/log//type=3','title'=>'私域运营日志'),
			)),
		)),
		array('title'=>'客户CRM','fa'=>'icon-supplierfeatures','url'=>'jy_scrm/member.list/','child'=>array(
			array('title'=>'企微客户','child'=>array(
				array('url'=>'jy_scrm/member.list/','title'=>'企微客户'),
				array('url'=>'jy_scrm/member.kanban/','title'=>'客户看板'),
				array('url'=>'jy_scrm/member.sea/','title'=>'客户公海'),
				array('url'=>'jy_scrm/member.recycling/','title'=>'客户回收'),
				array('url'=>'jy_scrm/member.daoru/','title'=>'导入分配'),
				array('url'=>'jy_scrm/member.genjin/','title'=>'跟进提醒'),
				array('url'=>'jy_scrm/member.genjin_index/','title'=>'跟进统计'),
				array('url'=>'jy_scrm/member.settags/','title'=>'聊天打标签'),
				array('url'=>'jy_scrm/member.settags_key/','title'=>'打标签规则'),
				array('url'=>'jy_scrm/member.group/','title'=>'客户组'),
				array('url'=>'jy_scrm/member.level/','title'=>'客户等级'),
				array('url'=>'jy_scrm/member.tags/','title'=>'客户标签'),
				array('url'=>'jy_scrm/member.loss/','title'=>'流失客户'),
				//array('url'=>'jy_scrm/member.diyform/','title'=>'自定义属性'),
			)),
			array('title'=>'非企微客户','child'=>array(
				array('url'=>'core/member.member/','title'=>'客户列表'),
				array('url'=>'core/member.group/','title'=>'客户等级'),
				array('url'=>'core/member.setting/','title'=>'参数设置'),
			)),
		)),
		array('title'=>'客户群管理','fa'=>'icon-yonghujieru','url'=>'jy_scrm/member.qunlist/','child'=>array(
			array('title'=>'群管理','child'=>array(
				array('url'=>'jy_scrm/member.qunlist/','title'=>'群列表'),
				array('url'=>'jy_scrm/member.qunmember/','title'=>'群成员'),
				array('url'=>'jy_scrm/member.qungroup/','title'=>'群分组'),
				array('url'=>'jy_scrm/member.laqunlist/','title'=>'自动拉群'),
				array('url'=>'jy_scrm/member.laqunqungroup/','title'=>'拉群分组'),
				array('url'=>'jy_scrm/member.laquntaglist/','title'=>'标签拉群'),
				array('url'=>'jy_scrm/member.qun_index/','title'=>'群统计'),
				array('url'=>'jy_scrm/member.qunwelcome/','title'=>'群欢迎语'),
			)),
		)),
		array('title'=>'运营引流','fa'=>'icon-quanzi','url'=>'jy_scrm/sale.liebian/','child'=>array(
			array('title'=>'运营引流','child'=>array(
				array('url'=>'jy_scrm/sale.liebian/','title'=>'裂变引流'),
				array('url'=>'jy_scrm/sale.choujiang/','title'=>'抽奖引流'),
				array('url'=>'jy_scrm/sale.redlist/','title'=>'红包引流'),
			)),
		)),
		array('title'=>'渠道活码','fa'=>'icon-fukuanma','url'=>'jy_scrm/code.list/','child'=>array(
			array('title'=>'渠道活码','child'=>array(
				array('url'=>'jy_scrm/code.list/','title'=>'活码管理'),
				array('url'=>'jy_scrm/code.group/','title'=>'活码分组'),
				array('url'=>'jy_scrm/code.index/','title'=>'活码统计'),
				//array('url'=>'jy_scrm/index/','title'=>'百度统计'),
			)),
		)),
		array('title'=>'员工发红包','fa'=>'icon-tuikuan1','url'=>'jy_scrm/worker.redlog/','child'=>array(
			array('title'=>'员工发红包','child'=>array(
				array('url'=>'jy_scrm/worker.redlog/','title'=>'红包记录'),
				array('url'=>'jy_scrm/worker.redlist/','title'=>'红包管理'),
				array('url'=>'jy_scrm/worker.reduser/','title'=>'员工管理'),
				array('url'=>'jy_scrm/worker.redindex/','title'=>'红包统计'),
			)),
		)),
		array('title'=>'风控监测','fa'=>'icon-liaotian','url'=>'jy_scrm/message.archiveset/','child'=>array(
			array('title'=>'风控监测','child'=>array(
				array('url'=>'jy_scrm/message.archiveset/','title'=>'消息存档'),
				array('url'=>'jy_scrm/message.logs/list/type=100','title'=>'会话内容'),
				array('url'=>'jy_scrm/message.msgwords/','title'=>'违规监控'),
				array('url'=>'jy_scrm/message.notice/','title'=>'违规提醒'),
			)),
		)),
		array('title'=>'通讯录管理','fa'=>'icon-bussinessman','url'=>'jy_scrm/worker.list/','child'=>array(
			array('title'=>'内部成员','child'=>array(
				array('url'=>'jy_scrm/worker.list/','title'=>'企业成员'),
				array('url'=>'jy_scrm/worker.dimission/','title'=>'离职继承'),
				array('url'=>'jy_scrm/worker.bumen/','title'=>'部门管理'),
				array('url'=>'jy_scrm/worker.tags/','title'=>'标签管理'),
				array('url'=>'jy_scrm/worker.isdel/','title'=>'员工删人'),
			)),
			array('title'=>'内部通讯','child'=>array(
				array('url'=>'jy_scrm/worker.linelog/','title'=>'工作日志'),
			)),
		)),
		array('title'=>'消息运营','fa'=>'icon-lvyoutehui','url'=>'jy_scrm/member.mass/','child'=>array(
			array('title'=>'企业微信群发','child'=>array(
				array('url'=>'jy_scrm/member.mass/','title'=>'企微群发'),
			)),
			array('title'=>'客服群发','child'=>array(
				array('url'=>'core/wechat.mass/','title'=>'群发消息'),
			)),
			array('title'=>'短信群发','child'=>array(
				//array('url'=>'core/setting.sms_list/','title'=>'短信群发'),
				array('url'=>'core/setting.sms_temp/','title'=>'模板管理'),
			)),
			//array('title'=>'消息互通','child'=>array(
			//	array('url'=>'core/wechat.mass/','title'=>'消息互通'),
			//)),
		)),	
		array('title'=>'内容云','fa'=>'icon-tuwenwenzhen','url'=>'core/account.content/','child'=>array(
			array('title'=>'内容云','child'=>array(
				array('url'=>'core/account.content/','title'=>'内容云'),
				array('url'=>'core/account.content_group/','title'=>'内容分类'),
			)),
		)),	
		/*array('title'=>'行业集成','fa'=>'icon-similarproduct','url'=>'jy_scrm/goods.list/','child'=>array(
			array('title'=>'行业集成','child'=>array(
				array('url'=>'jy_scrm/goods.list/','title'=>'行业集成'),
			)),
		)),*/
		array('title'=>'应用中心','isplugin'=>1,'fa'=>'icon-box','url'=>'jy_scrm/plugins/','child'=>$plugins),
		array('title'=>'权限管理','fa'=>'icon-listzuhe','url'=>'core/basic.plugin_perm//plugin_name=jy_scrm','child'=>array(
			array('title'=>'权限管理','child'=>array(
				array('url'=>'core/basic.plugin_perm//plugin_name=jy_scrm','title'=>'操作权限'),
				array('url'=>'core/account.operator/','title'=>'操作员管理'),
			)),
		)),	
);
if(!$this->plugin_exists('jy_scrmtask')){
	unset($menus[3]);
}
return $menus;
